<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Hello World</title>
    <script src="react.development.js"></script>
    <script src="react-dom.development.js"></script>
    <script src="babel.min.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script type="text/babel">

        class Input extends React.Component{
                constructor(props) {
                    super(props);
                    this.state = {
                        "value":"hi"
                    };
                }

                componentDidMount() {
                    this.timeInter = setInterval(
                        () => this.tick(), 2000)
                }

                componentWillMount(){
                    clearInterval(this.timeInter);
                }

                tick(){
                    this.setState({
                        "value":""
                    });
                }

                render(){
                    return (
                        <input value={this.state.value} />
                    );
                }
                
        }

        ReactDOM.render(
            <Input />,
            document.getElementById('root') 
        )
    </script>
  </body>
</html>